set(HAIRCORETEST_SOURCE_FILES haircoretest.cpp)
add_executable(haircoretest ${HAIRCORETEST_SOURCE_FILES})
add_dependencies(haircoretest haircore)

set(HAIRCORETEST_INCLUDE_DIRS ./ ../HairCore/include)
set(HAIRCORETEST_LIBRARIES haircore)

find_package(GTEST REQUIRED)
if (GTEST_FOUND)
    set(HAIRCORETEST_INCLUDE_DIRS ${HAIRCORETEST_INCLUDE_DIRS} ${GTEST_INCLUDE_DIR})
    set(HAIRCORETEST_LIBRARIES ${HAIRCORETEST_LIBRARIES} ${GTEST_LIBRARY})
endif (GTEST_FOUND)

find_package(EIGEN3 REQUIRED)
if (EIGEN3_FOUND)
    set(HAIRCORETEST_INCLUDE_DIRS ${HAIRCORETEST_INCLUDE_DIRS} ${EIGEN3_INCLUDE_DIR})
    set(HAIRCORETEST_LIBRARIES ${HAIRCORETEST_LIBRARIES} ${EIGEN3_LIBRARY})
endif (EIGEN3_FOUND)

target_link_libraries(haircoretest ${HAIRCORETEST_LIBRARIES})
target_include_directories(haircoretest PUBLIC ${HAIRCORETEST_INCLUDE_DIRS})
target_compile_definitions(haircoretest PUBLIC GTEST)
